<?php
class FrontAction{
	public $data;
	public $lang;
	
	function __construct(){
		$this->data = array();
		$clang = getSession('lang');
		if(!empty($clang)){
			$this->lang = $clang;
		}else{
			$this->lang = 'cn';
		}
		$syscfg = loadData('syscfg',$this->lang);
		$this->data['syscfg'] = $syscfg;
	}
	
	function getDB(){
		require 'config/db.php';
		require 'inc/mysql.php';
		return $db = new mysql($dbhost, $dbuser, $dbpw, $dbname, $pconnect,$charset);
	}
	
	function getLang(){
		return getLang();
	}
}